<!DOCTYPE html>
<html>
<head lang="zh">
  <meta charset="UTF-8" />
  <title>支付宝</title>
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="format-detection" content="telephone=no, email=no" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <link rel="stylesheet" href="https://as.alipayobjects.com/g/antui/antui/10.0.18/dpl/??antui.css,widget/notice.css" />
<style>
.demo {
  margin: 1em 0;
  padding: 1em 1em 2em;
  background: #fff;
}

.demo h1 {
  padding-left: 8px;
  font-size: 24px;
  line-height: 1.2;
  border-left: 3px solid #108EE9;
}

.demo h1,
.demo p {
  margin: 1em 0;
}

.demo .am-button + .am-button,
.demo .btn + .btn,
.demo .btn:first-child {
  margin-top: 10px;
}

.fn-hide {
  display: none !important;
}

input {
  display: block;
  padding: 4px 10px;
  margin: 10px 0;
  line-height: 28px;
  width: 100%;
  box-sizing: border-box;
}
</style>
</head>
<body>
  <div class="am-notice fn-hide" id="J_envTip20161108">
    <div class="am-notice-content">请在支付宝 App 内进行支付 :(</div>
  </div>

<script>
function getQuery() {
  var match;
  var urlParams = {};
  var pl = /\+/g;
  var search = /([^&=]+)=?([^&]*)/g;
  var decode = function (s) {
    return decodeURIComponent(s.replace(pl, ' '));
  };
  var query = decodeURI(window.location.search.substring(1));

  while (match = search.exec(query)) {
    urlParams[decode(match[1])] = decode(match[2]);
  }

  return urlParams;
}
</script>
<div class="demo">
  <script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>

<button id="J_btn" class="btn btn-default">支付</button>
<script>
  var btn = document.querySelector('#J_btn');
  btn.addEventListener('click', function(){
    ap.tradePay({
      orderStr: 'alipay_sdk=alipay-easysdk-java&app_id=2021002131607629&biz_content=%7B%22body%22%3A%22FUNTASYISLAND%22%2C%22out_trade_no%22%3A%221749407072726622210%22%2C%22passback_params%22%3A%225%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%2C%22subject%22%3A%22FUNTASYISLAND%22%2C%22time_expire%22%3A%222024-01-22+20%3A27%3A03%22%2C%22total_amount%22%3A%22680.00%22%7D&charset=utf-8&format=json&method=alipay.trade.app.pay&notify_url=https%3A%2F%2Fapi.livelab.com.cn%2FthirdParty%2Fali%2Fapp%2Fpay%2FpayNotify&sign=NcJXJLtz5dscyjn3MkMzVRHynXiQBowKDrqP8wt%2FqvgLBTxFB4PkFPe49s9y2eNhOq0rnI1u1ou2rP%2BWQe1FLGFO021RdDvymfqHDkZf4NvsgM8bAUgS%2FbTPFIKERkz5uIGOIw%2FlsUzIeraUEGXIXVPIOiuFw006w2vQJ6Qmjm6G%2BbnMERcq%2Fd2mf7cDgGOOA%2BiqnmFZ%2BqhAK5scNui8DHRCf6K51aRHAYZnbM5xpIAcNHY2KjtpupcvlNNj8O7mk05Vd3lf5EZFhi7lhi1E1yABCqzZTif39pZpnaWvj94N2ywlV%2F71BZy0oqiehuD0M7Y6n%2BDI6ij3buGyp%2FWs%2FA%3D%3D&sign_type=RSA2&timestamp=2024-01-22+20%3A22%3A25&version=1.0'
    }, function(res){
      ap.alert(res.resultCode);
    });
  });
</script>
</div>
<script>
(function() {
  var eTipElement = document.getElementById('J_envTip20161108');
  if (!/AlipayClient/i.test(navigator.userAgent)) {
    eTipElement.classList.remove('fn-hide');
  }
  if (location.href.indexOf('/en-us/') >= 0) {
    eTipElement.querySelector('.am-notice-content').innerText = 'To run the demo, open this page in Alipay APP';
  }

  var buttons = document.querySelectorAll('.btn');
  if (buttons.length > 0) {
    var length = buttons.length;
    var i = 0;
    for (; i < length; i++) {
      buttons[i].classList.add('am-button');
    }
  }
})();
</script>

<script src="https://a.alipayobjects.com/static/fastclick/1.0.6/fastclick.min.js"></script>
<script>window.FastClick && FastClick.attach(document.body);</script>

<div style="display:none">
<script src="https://s11.cnzz.com/z_stat.php?id=1261676206&web_id=1261676206" language="JavaScript" id="J_cnzz"></script>
</div>
</body>
</html>